﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Input.Touch;

namespace TrovaIntruso.core
{
    public class Sprite
    {
        public Texture2D tex;
        public Rectangle Rect;
        public Sprite(Texture2D tex, Rectangle dest)
        {
            this.tex = tex; 
            this.Rect = dest;
        }

        public void Draw(SpriteBatch spb)
        {
            spb.Begin();
            spb.Draw(tex, Rect, Color.White);
            spb.End();
        }

        public bool Contains(Vector2 pos) {
            return Rect.Contains(new Point((int)pos.X,(int)pos.Y));
        }
    }
}
